#ifndef __PAPI_HOOK_H__
#define __PAPI_HOOK_H__

#ifdef _PAPI_

template <typename T>  class PAPI {
  void papi_test_fail(char *file, int line, char *call, int retval);
  void papi_clean_cache();
  void papi_check_failures_and_start(int evid);
  void papi_init();

  PAPI (const PAPI &);
  const PAPI &operator=(const PAPI &);
public:
  PAPI() {}
  void papi_loop(T &callable);
};

#endif

#endif // _PAPI_
